﻿using System;
using XStudio.biz;
using XStudio.IService;

namespace XStudio.Service
{
    //服务层父类
    public class BaseService<TEntity> : IBaseService<TEntity> where TEntity : class
    {
        private BaseBiz<TEntity> _baseDal;

        public BaseService()
        {
            if (_baseDal == null)
            {
                _baseDal = new BaseBiz<TEntity>();
            }
        }

        //获取
        public TEntity Get(String primaryKey)
        {
            return null;
        }

        //插入
        public object Insert(TEntity model)
        {
            return "";
        }

        //删除
        public int Delete(object primaryKey)
        {
            return 1;
        }

        //更新
        public int Update(TEntity model)
        {
            return 1;
        }
    }
}
